package invoicesystem.service.impl;

import invoicesystem.dao.InvoicingRecordDao;
import invoicesystem.dao.impl.InvoicingRecordDaoImpl;
import invoicesystem.entry.InvoicingRecord;


import invoicesystem.pojo.InvoicingApplyList;


import invoicesystem.pojo.SelectTitleAndInvoic;
import invoicesystem.pojo.TitleAndAddress;
import invoicesystem.service.InvoicingRecordService;
import invoicesystem.util.PageHelper;

import java.util.ArrayList;

public class InvoicingRecordServiceImpl implements InvoicingRecordService {

    InvoicingRecordDao invoicingRecordDao = new InvoicingRecordDaoImpl();

    @Override
    public TitleAndAddress selectTitleAndAddress(Integer enterprise_id) {
        return null;
    }

    @Override
    public ArrayList<InvoicingApplyList> selectall() {
        return null;
    }

    @Override
    public ArrayList<InvoicingApplyList> selectByCreate_timeOrByTitleOramount(SelectTitleAndInvoic selectTitleAndInvoic, PageHelper pageHelper) {
        System.out.println("-------------service-----------"+selectTitleAndInvoic);
        return invoicingRecordDao.selectByCreate_timeOrByTitleOramount(selectTitleAndInvoic,pageHelper);
    }

    @Override
    public int updateTitleAndAddress(String title) {
        return 0;
    }

    @Override
    public boolean insertInvoicingRecord(InvoicingRecord invoicingRecord) {
        return false;
    }


    @Override
    public int returnInvoicingRecord(Integer id) {
        return invoicingRecordDao.returnInvoicingRecord(id);
    }

    @Override
    public ArrayList selectMultitable(Integer id) {
        System.out.println("---service---");
        return invoicingRecordDao.selectMultitable(id);
    }

    @Override
    public ArrayList selectemail_id(Integer email_id) {
        return invoicingRecordDao.selectemail_id(email_id);
    }

    @Override
    public int selectInvoicSize(SelectTitleAndInvoic selTitle) {
        return invoicingRecordDao.selectInvoicSize(selTitle);
    }


    /*public static void main(String[] args) {
       SelectTitleAndInvoic selTitle = new SelectTitleAndInvoic (123456,null,null,null,null,null);
        InvoicingRecordService invoicingRecordService = new InvoicingRecordServiceImpl();
        ArrayList<InvoicingApplyList> lists = invoicingRecordService.selectByCreate_timeOrByTitleOramount(selTitle);
        InvoicingRecord invoicingRecord = new InvoicingRecord();
        invoicingRecord.setId(1);
        System.out.println(invoicingRecordService.returnInvoicingRecord(invoicingRecord.getId()));

        System.out.println(lists);
    }*/
    @Override
    public boolean updateInvoicingRecord(InvoicingRecord invoicingRecord) {
        return invoicingRecordDao.updateInvoicingRecord(invoicingRecord);
    }
}
